<?php

namespace App\Models;


use Illuminate\Support\Facades\Storage;

class Config extends Base
{
    protected $table = 'config';
    const SITE_KEY = 'site';
    const COMPANY_KEY_TYPE = 'company_type';
    const COMMISSIONED_ROLE_TYPE = 'commissioned_role';

    public static function getSiteVal() {
        $val = self::where('key', self::SITE_KEY)->value('value');
        return json_decode($val, true);
    }


    public static function getLogoUrl($url) {
        return Storage::disk('upload_logo')->url($url);
    }

}
